#pragma once
#include "Context.h"
#include <vector>

class ContextManage{

	public:
	ContextManage(void);
	~ContextManage(void);
	int createContext(int w,int h);
	void setContext(int id);
	Context * cc;
	std::vector <Context *> contexts;
	static int contextCount;

};

int ContextManage::contextCount = 0;
Context * cc;
std::vector <Context *> contexts;
Context * c;

int ContextManage::createContext(int w,int h){

	c = new Context(w,h);
	contexts.push_back(c);
	contextCount++;
	return contexts.size()-1;
}

void ContextManage::setContext(int id){

	if (id<contextCount){
		cc = contexts[id];

	}
} 


ContextManage::ContextManage(void)
{
}


ContextManage::~ContextManage(void)
{
}

